// 汉中库得网络科技版权所有

#pragma once

#include "CoreMinimal.h"
#include "Engine/GameInstance.h"
#include "BBGameInstance.generated.h"

DECLARE_LOG_CATEGORY_EXTERN(LogBuildingBlock, Log, All);

/**
 * BuildingBlock的游戏实例
 */
UCLASS()
class BUILDINGBLOCK_API UBBGameInstance : public UGameInstance
{
	GENERATED_BODY()
public:
	/**
	 * 判断当前关卡是否已解锁
	 */
	UFUNCTION(BlueprintCallable, Category="BBGameInstance")
	bool GetIsUnlocked() const;

	UFUNCTION(BlueprintCallable, Category="BBGameInstance")
	void SetCurrentLevel(FName Level);
	
	UFUNCTION(BlueprintCallable, Category="BBGameInstance")
	FName GetCurrentLevel(int32& LevelCount) const;
private:
	UBBGameInstance();
	
	FName CurrentLevel = "level1";
};
